Skip to content

Replace empty() with strict comparison in InAppPurchaseCartPositionStruct#148

Open
Copilot wants to merge 1 commit intotrunkfrom
copilot/fix-empty-construct-issue
Open

Replace empty() with strict comparison in InAppPurchaseCartPositionStruct#148
Copilot wants to merge 1 commit intotrunkfrom
copilot/fix-empty-construct-issue

Conversation

Copy link
Copy Markdown

Copilot AI commented May 3, 2026

PHPStan (via shopware/github-actions/phpstan@main) rejects empty() as insufficiently strict.

Change

Replaced !empty() with an explicit isset + non-empty array check:

// Before
if (!empty($data['subscriptionChange'])) {

// After
if (isset($data['subscriptionChange']) && $data['subscriptionChange'] !== []) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants